package boun.center;

import java.io.Serializable;
import java.util.ArrayList;

public class LineSchedule implements Serializable {
    private static final long serialVersionUID = 1L;
    ArrayList<String> weekDayTimes = new ArrayList<String>();
    ArrayList<String> weekEndTimes = new ArrayList<String>();
    ArrayList<String> holidayTimes = new ArrayList<String>();
    
    public ArrayList<String> getDailyTimes(BusSchedule.DayType dayType) {
        if (dayType == null) {
            return null;
        }
        switch (dayType) {
        case HOLIDAY:
            return holidayTimes;
        case WEEK_DAY:
            return weekDayTimes;
        case WEEK_END:
            return weekEndTimes;
        default:
            return null;
        }
    }
    
    public void insertDailyTime(BusSchedule.DayType dayType, String time) {
        if (dayType == null) {
            return;
        }
        switch (dayType) {
        case HOLIDAY:
            holidayTimes.add(time);
            break;
        case WEEK_DAY:
            weekDayTimes.add(time);
            break;
        case WEEK_END:
            weekEndTimes.add(time);
            break;
        }
    }
}
